package com.lovecws.mumu.demo.spring.session.simple.configuration;

import org.springframework.context.EmbeddedValueResolverAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportAware;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration;
import org.springframework.util.StringValueResolver;

/**
 * 简单httpSession 容器
 * @author baby慕慕
 */
@Configuration
@EnableScheduling
public class SimpleHttpSessionConfiguration extends SpringHttpSessionConfiguration
		implements EmbeddedValueResolverAware, ImportAware {

	@Bean
	public SimpleOperationsSessionRepository sessionRepository() {
		SimpleOperationsSessionRepository sessionRepository = new SimpleOperationsSessionRepository();
		return sessionRepository;
	}

	@Override
	public void setImportMetadata(AnnotationMetadata importMetadata) {

	}

	@Override
	public void setEmbeddedValueResolver(StringValueResolver resolver) {

	}

}
